﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JsonParser
{
	public interface ITrimmableIndexString
	{
		int CompareTo(TrimmableIndexString value);

		bool Contains(TrimmableIndexString value);

		bool EndsWith(TrimmableIndexString value);
		bool EndsWith(TrimmableIndexString value, bool ignoreCase);

		bool Equals(TrimmableIndexString value);

		int IndexOf(char value);
		int IndexOf(TrimmableIndexString value);
		int IndexOf(char value, int startIndex);
		int IndexOf(TrimmableIndexString value, int startIndex);
		int IndexOf(char value, int startIndex, int count);
		int IndexOf(TrimmableIndexString value, int startIndex, int count);

		int IndexOfAny(char[] anyOf);
		int IndexOfAny(char[] anyOf, int startIndex);
		int IndexOfAny(char[] anyOf, int startIndex, int count);

		TrimmableIndexString Insert(int startIndex, TrimmableIndexString value);

		int LastIndexOf(char value);
		int LastIndexOf(TrimmableIndexString value);
		int LastIndexOf(char value, int startIndex);
		int LastIndexOf(TrimmableIndexString value, int startIndex);
		int LastIndexOf(char value, int startIndex, int count);
		int LastIndexOf(TrimmableIndexString value, int startIndex, int count);

		int LastIndexOfAny(char[] anyOf);
		int LastIndexOfAny(char[] anyOf, int startIndex);
		int LastIndexOfAny(char[] anyOf, int startIndex, int count);

		TrimmableIndexString PadLeft(int totalWidth);
		TrimmableIndexString PadLeft(int totalWidth, char paddingChar);

		TrimmableIndexString PadRight(int totalWidth);
		TrimmableIndexString PadRight(int totalWidth, char paddingChar);

		TrimmableIndexString Remove(int startIndex);
		TrimmableIndexString Remove(int startIndex, int count);

		TrimmableIndexString Replace(char oldValue, char newValue);
		TrimmableIndexString Replace(TrimmableIndexString oldValue, TrimmableIndexString newValue);

		TrimmableIndexString[] Split(char[] separator);
		TrimmableIndexString[] Split(TrimmableIndexString separator);
		TrimmableIndexString[] Split(TrimmableIndexString[] separator);
		TrimmableIndexString[] Split(char[] separator, int count);
		TrimmableIndexString[] Split(TrimmableIndexString separator, int count);
		TrimmableIndexString[] Split(TrimmableIndexString[] separator, int count);
		TrimmableIndexString[] Split(char[] separator, int count, StringSplitOptions options);
		TrimmableIndexString[] Split(TrimmableIndexString separator, int count, StringSplitOptions options);
		TrimmableIndexString[] Split(TrimmableIndexString[] separator, int count, StringSplitOptions options);

		bool StartsWith(TrimmableIndexString value);
		bool StartsWith(TrimmableIndexString value, bool ignoreCase);

		TrimmableIndexString Substring(int index);
		TrimmableIndexString Substring(int index, int length);

		char[] ToCharArray();
		char[] ToCharArray(int startIndex, int length);

		TrimmableIndexString ToLower();

		string ToString();

		TrimmableIndexString ToUpper();

		TrimmableIndexString Trim();
		TrimmableIndexString Trim(params char[] trimChars);

		TrimmableIndexString TrimEnd();
		TrimmableIndexString TrimEnd(params char[] trimChars);

		TrimmableIndexString TrimStart();
		TrimmableIndexString TrimStart(params char[] trimChars);
	}
}
